import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { resolve } from 'path';
import vueJsx from "@vitejs/plugin-vue-jsx";

function pathResolve(dir: string) {
	return resolve(process.cwd(), '.', dir);
}
// https://vitejs.dev/config/
export default defineConfig({
	plugins: [
		vue(),
		vueJsx() //插件使用
	],
	resolve: {
		alias: [
			{
				find: /\/#\//,
				replacement: pathResolve('types') + '/',
			},
			{
				find: '~',
				replacement: pathResolve('packages') + '/',
			},
		],
		dedupe: ['vue'],
	},
})
